package com.gvsoft.analyse.order;

import com.gvsoft.analyse.inf.IOrder;

/**
 * Created with IntelliJ IDEA.
 * ProjectName:gvMsgRouting
 * Author: zhaoqiubo
 * Date: 15/8/13
 * Time: 下午4:39
 * Desc: 短消息指令
 */
public class MsgOrder extends Order implements IOrder {

    public final static String HEADER = "M";

    private String msgBody;

    public void initMsgOrder(String msgBody){
        this.rid = getNewRid();
        this.msgBody = msgBody;
    }

    public String getMsgBody() {
        return msgBody;
    }

    public void setMsgBody(String msgBody) {
        this.msgBody = msgBody;
    }

    public String generateOrderStr(){
        StringBuffer sb = new StringBuffer();
        sb.append(HEADER).append("|").append(this.getRid()).append("|").append("s").append("|").append(this.getMsgBody());
        return sb.toString();
    }

}
